import { request } from "@/utils/service"
export interface IPosition {
  id?: number
  positionName?: string
  positionCode?: string
  enable?: boolean
  tenantId?: number
  createUser?: any
  createTime?: string
  updateUser?: any
  updateTime?: string
}

export function getPositionListApi(params: IPosition) {
  return request({
    url: "system/position/list",
    method: "get",
    params
  })
}

export function createPositionApi(data: IPosition) {
  return request({
    url: "system/position/create",
    method: "post",
    data
  })
}

export function updatePositionApi(data: IPosition) {
  return request({
    url: "system/position/update",
    method: "put",
    data
  })
}

export function deletePositionApi(data: { id: number; force?: boolean }) {
  return request({
    url: "system/position/" + data.id,
    method: "delete",
    params: { force: data.force }
  })
}
